{% extends "bootstrap/base.html" %}
{% block title %}{{ title }}{% endblock %}
{%- block metas %}
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
{%- endblock metas %}
{% block styles %}
    {{ super() }}
    <link rel="stylesheet" href="static/hf/css" />
{% endblock %}
{% block navbar %}
    <div class="navbar navbar-inverse" role="navigation">
        <div class="container">
            <div class="navbarr-header"><a class="navbar-brand" href="/">学生信息管理系统</a></div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a href="/">首页</a></li>
                    <li><a href="{{ url_for('student_list') }}">学生信息</a></li>
                    <li><a href="{{ url_for('student_add') }}">添加学生信息</a></li>
                    <li><a href="{{ url_for('log_view') }}">日志系统</a></li>
                    <li><a href="{{ url_for('explore') }}">探索</a></li>
                    {% if current_user.is_authenticated %}
                        <li><a href="{{ url_for('user_logout') }}">退出({{ current_user.username }})</a></li>
                    {% else %}
                        <li><a href="{{ url_for('user_login') }}">登录</a></li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </div>
{% endblock %}

{% block content %}
    <div class="container">
        {% with messages = get_flashed_messages() %}
            {% for message in messages %}
                {% if message %}
                    <div class="alert alert-warning" role="alert">{{ message }}</div>
                {% endif %}
            {% endfor %}
        {% endwith %}
        {% block page_content %}

        {% endblock %}
    </div>
{% endblock %}
